<div class="full_w">
    <div class="h_title"><?php echo Yii::t('AdmincpModule.admincp', 'Email Templates'); ?></div>
    <h2>Email Templates</h2>
    <p>The Email Templates module lets you edit the bodies and subjects of all emails that go out from your site to your users through mail function. You are able to edit any email body text based on which email it is being sent for.</p>
    <div class="entry">
        <div class="sep"></div>
    </div>
    <table>
        <thead>
            <tr>
            	<th scope="col" class="chb"><input type="checkbox" onclick="selectAll(this);"></th>
                <th scope="col"><?php  echo Yii::t('AdmincpModule.admincp', 'Name');?></th>
                <th scope="col"><?php  echo Yii::t('AdmincpModule.admincp', 'Code');?></th>
                <th scope="col"><?php  echo Yii::t('AdmincpModule.admincp', 'Description');?></th>
            </tr>
        </thead>
            
        <tbody>
        <?php if(!empty($arrEmailTemplates)):?>
			<?php foreach($arrEmailTemplates as $i=>$R):?>
            <tr>
                <td class="align-center"><input type="checkbox" name="id[]" value="<?php echo $R['template_id']; ?>"></td>
                <td>
					<?php echo $R['template_name']; ?>
                    <p style="margin:0; padding: 2px 0 0;">
                        <a href="<?php echo LINK_ADMINCP_EMAILTEMPLATES.'/form/?id='.$R['template_id']; ?>"  title="Edit">Edit</a> | 
                        <a href="<?php echo LINK_ADMINCP_EMAILTEMPLATES.'/delete/?id='.$R['template_id']; ?>" title="Delete">Delete</a> 
                    </p>
                </td>
                <td><?php echo $R['template_code']; ?></td>
                <td><?php echo $R['template_description']; ?></td>
            </tr>
            <?php endforeach; ?>
		<?php else: ?>
            <tr>
                <td colspan="7">No data found!</td>
            </tr>
        <?php endif; ?>
        </tbody>
    </table>
    <div class="entry">
        <?php $this->widget('Pagination', array(
			'pages' => $objPages,
		)) ?>
        <div class="sep"></div>		
        <a class="button add" href="<?php echo LINK_ADMINCP_EMAILTEMPLATES.'/form'; ?>"><?php echo Yii::t('AdmincpModule.admincp', 'Add new template'); ?></a>
    </div>
</div>